<?php
/* @var $this ProductController */
/* @var $model Product */

$this->breadcrumbs=array(
	'Products'=>array('index'),
	$model->product_pn,
);

if(isset(Yii::app()->session['adminUser'])){
	$this->menu=array(
		array('label'=>'List Product', 'url'=>array('index')),
		array('label'=>'Create Product', 'url'=>array('create')),
		array('label'=>'Update Product', 'url'=>array('update', 'id'=>$model->product_pn)),
		array('label'=>'Delete Product', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->product_pn),'confirm'=>'Are you sure you want to delete this item?')),
		//array('label'=>'Manage Product', 'url'=>array('admin')),
	);
}else{
	$this->menu=array(
		array('label'=>'List Product', 'url'=>array('index')),
	);
}
?>

<h1>View Product # <?php echo $model->brands." - ".$model->product_pn; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'brands',
		'categoryID.category',
		'vendorID.vendor',
		'universal_input',
		array(
			'name'=>'wattage',
			'value'=>$model->wattage.' WATT',
         ),
		'lumens',
		array(
			'name'=>'lifetime',
			'value'=>$model->lifetime.' Hours',
         ),
		 array(
			'name'=>'cct',
			'value'=>$model->cct.' K',
         ),
		 array(
			'name'=>'warranty',
			'value'=>$model->warranty.' Years',
         ),
		'powerfactor',
		'product_pn',
		array(

			//$koma = number_format(number)
			'name'=>'unit_buy',
			'value'=>'$'.number_format($model->unit_buy,2,'.',','),
         ),
		 array(
			'name'=>'unit_sell',
			'value'=>'$'.number_format($model->unit_sell,2,'.',','),
         ),
	),
)); ?>
